import {html, TemplateResult} from 'lit';
import type {Meta, StoryObj} from '@storybook/web-components';
import "../../../echarts/gauge/lit-gauge-progress.ts"
import {GaugeProgressProps} from "../../../echarts/gauge/lit-gauge-progress.ts";

const meta: Meta<GaugeProgressProps> = {
    title: 'Echarts/LitGaugeProgress',
    tags: ['autodocs'],
    render: (args: GaugeProgressProps): TemplateResult => {
        return html`<lit-gauge-progress 
            .chartId=${args.chartId}
            .width=${args.width}
            .height=${args.height}
            .thick=${args.thick}
            .min=${args.min}
            .max=${args.max}
            .splitNumber=${args.splitNumber}
            .unit=${args.unit}
            .value=${args.value}
        />`;
    },
    argTypes: {
        chartId: { control: 'text' },
        width: { control: 'text' },
        height: { control: 'text' },
        thick: { control: 'number' },
        value: { control: 'number' },
        min: { control: 'number' },
        max: { control: 'number' },
        splitNumber: { control: 'number' },
        unit: { control: 'text' },
    },
};

export default meta;
type Story = StoryObj<GaugeProgressProps>;

export const Default: Story = {
    args: {
        chartId: 'basic-gauge-progress-chart',
        width: '800px',
        height: '600px',
        thick: 1,
        value: 100,
        min: 0,
        max: 240,
        unit: 'km/h',
        splitNumber: 12
    }
}